<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
<script type="text/javascript">
	$(function(){
		$("#send").click(function(){
			var obj={'uname':'john','sex':true};
			alert(obj);
			$.ajax({type: "POST",
		             url: "test",
		             data: JSON.stringify(obj),
		             contentType:"application/json;charset=UTF-8",
		             dataType: "json",
		             success: function(data){
		            	 alert("ddd");
		             }
					
				}
			
			);
		});
		
	});
</script>
</head>
<body>
	<button id="send">test</button>
</body>
</html>